package com.sky.Screen;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;

import com.healthcare.widget.ActionBar;
import com.healthcare.widget.ActionBar.IntentAction;
import com.sky.Database.DBHelper;
import com.sky.Database.OfficeSQL;
import com.sky.Model.Office;
import com.sky.heathcare.R;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;

public class NotificationActivity extends Activity {

	private DBHelper dbHelper;	
	private Office office;
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.notification_activity);
		
		final ActionBar actionBar = (ActionBar) findViewById(R.id.actionbar);       
        actionBar.setTitle("Cai dat notification");

        actionBar.setHomeAction(new IntentAction(this, MainActivity.createIntent(this), R.drawable.ic_title_home_default));
        actionBar.setDisplayHomeAsUpEnabled(true);
		
		initDB();
		initUI();
	}
	
	private void initUI() {
		office = new Office();
		OfficeSQL officeSQL = new OfficeSQL(dbHelper);
		
		office = (Office) officeSQL.getByID(0);
		String sName = office.getName();
		String sContact = office.getContact();
		
	}

	private void initDB() {
		this.dbHelper = new DBHelper(this);
	}
	
	@Override
	protected void onStop() {
		if (dbHelper != null)
			dbHelper.close();
		super.onStop();
	}
	
	private void gotoMainScreen() {
		Intent intent = new Intent(this, MainActivity.class);		
		startActivity(intent);	
	}

	
}
